package com.handsome.外观模式;

/**
 * @author niechun
 * @date 2023/3/2 20:03
 */
public class Popcorn {

    private Popcorn(){

    }
    private  static Popcorn popcorn;


    public static Popcorn getInstance(){
        if (popcorn==null){
            synchronized (Popcorn.class){
                if (popcorn==null){
                    popcorn=new Popcorn();
                }
            }
        }
       return popcorn;
    }

    public void on(){
        System.out.println(" Popcorn on");
    }

    public void off(){
        System.out.println(" Popcorn off");
    }

    public void make(){
        System.out.println(" pop ");
    }


}
